Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

result decoder #35

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open

result decoder #35

wants to merge 7 commits into from

Conversation

mulias
Copy link
Contributor

@mulias mulias commented Jan 26, 2019

  • Improve how error messages are constructed when a decoder fails. I still don't love it, but it's a step in the right direction.
  • Add decoders and utilities to help with managing imperfect data. The result decoder introduces a composable way to let parts of a decoder fail, without failing the full decoder. The Result.errors and Decoder.mapError utilities help work with the result decoder.
  • Provide an example of how these tools can be used to validate an array of data, filtering out and logging failures.

Elias Mulhall added 7 commits January 26, 2019 16:45
Decoder to prevent error propagation. Always succeeds, but instead of
returning the decoded value, return a `Result` object containing either
the successfully decoded value, or the decoder failure error.
Counterpart to Result.successes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant